package com.zhentao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 提现规则
 * @TableName withdraw_rule
 */
@TableName(value ="withdraw_rule")
@Data
public class WithdrawRule implements Serializable {
    /**
     * 登录id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 身份
     */
    private String identity;

    /**
     * 拉入的用户充值了VIP
     */
    private String vipRule;

    /**
     * 拉入的用户充值了红娘
     */
    private String matchmakerRule;

    /**
     * 软删
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WithdrawRule other = (WithdrawRule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIdentity() == null ? other.getIdentity() == null : this.getIdentity().equals(other.getIdentity()))
            && (this.getVipRule() == null ? other.getVipRule() == null : this.getVipRule().equals(other.getVipRule()))
            && (this.getMatchmakerRule() == null ? other.getMatchmakerRule() == null : this.getMatchmakerRule().equals(other.getMatchmakerRule()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIdentity() == null) ? 0 : getIdentity().hashCode());
        result = prime * result + ((getVipRule() == null) ? 0 : getVipRule().hashCode());
        result = prime * result + ((getMatchmakerRule() == null) ? 0 : getMatchmakerRule().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", identity=").append(identity);
        sb.append(", vipRule=").append(vipRule);
        sb.append(", matchmakerRule=").append(matchmakerRule);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}